var i = require("../../../../@babel/runtime/helpers/defineProperty"), n = getApp();

Component({
    lifetimes: {
        ready: function() {
            this.getData();
        }
    },
    properties: {},
    data: {
        list: [ {
            title: "活跃值",
            count: 0,
            url: "sign_in_subscribe_active_value",
            src: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/sign_in_subscribe/sign_in_active.png"
        }, {
            title: "股权",
            count: 0,
            url: "sign_in_subscribe_stock_rights",
            src: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/sign_in_subscribe/sign_in_stocks.png"
        }, {
            title: "元宝枫",
            count: 0,
            url: "sign_in_subscribe_acer_truncatum",
            src: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/sign_in_subscribe/sign_in_ingot.png"
        }, {
            title: "有效用户",
            url: "sign_in_subscribe_user",
            src: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/sign_in_subscribe/sign_in_user.png"
        }, {
            title: "奖励记录",
            url: "sign_in_subscribe_earnings",
            src: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/sign_in_subscribe/sign_in_rewards.png"
        }, {
            title: "我的团队",
            url: "sign_in_subscribe_team",
            src: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/sign_in_subscribe/sign_in_team.png"
        } ],
        grade_name: "",
        user_name: "",
        avatar_image: ""
    },
    methods: {
        getData: function() {
            var s = this;
            n._getNetWork({
                url: n.getNetAddresss("plugin.sign-buy.frontend.sign-buy-page.member"),
                success: function(t) {
                    var e, a = t.data, r = a.data, u = a.result, g = a.msg;
                    if (console.log(r), 0 == u) return n.tips(g);
                    var c = r.usable, o = r.froze, _ = r.yuan_bao_feng, l = r.stock_total, p = r.is_vip, m = r.grade_name, b = r.user_name, d = r.avatar_image;
                    console.log(c), console.log(l), console.log(_), s.setData((i(e = {}, "list[0].count", c), 
                    i(e, "list[1].count", l), i(e, "list[2].count", _), i(e, "froze", o), i(e, "is_vip", p), 
                    i(e, "grade_name", m), i(e, "user_name", b), i(e, "avatar_image", d), e));
                }
            });
        },
        link: function(i) {
            "code" == i.currentTarget.dataset.url ? wx.navigateTo({
                url: "/packageF/sign_in_subscribe/".concat(i.currentTarget.dataset.url, "/").concat(i.currentTarget.dataset.url, "?type=1")
            }) : wx.navigateTo({
                url: "/packageF/sign_in_subscribe/".concat(i.currentTarget.dataset.url, "/").concat(i.currentTarget.dataset.url)
            });
        }
    }
});